/**
 * Top-level controller for contact list utility
 * This creates a new ContactsList object, manages the UI logic, and handles starting and stopping
 * @author Joshua Zeiser, Meg Stevens
 * 
 */
import java.util.*;//MS
public class Main {

	/**
	 * Main method, controller for menu-driven CLI, handles entry and exit
	 * @param args
	 */
	public static void main(String[] args) {//JZ
		ContactsList c1= new ContactsList (); //MS create new ContactsList object
		c1.addNewContact();
		System.out.println("With 1 contact: "+c1);
		c1.addNewContact();
		System.out.println("With 2 contacts: "+c1);
		/*int menuSelection; //MS initialize variable for switch and while statements
		ContactsList c1= new ContactsList (); //MS create new ContactsList object
		//might take an argument to load from memory if a pre-existing contact list exists?
		Scanner myScanner = new Scanner(System.in); //MS create Scanner object for reading user input
		System.out.print("Contact List Menu\n"+// MS print menu for first input from user
				"1 - Add New Contact \n" +
				"2 - Print Contact List \n" +
				"3 - Search by Last Name \n" +
				"4 - Exit Program \n"+
				"Enter the number of the menu item you wish to access: ");
		menuSelection=myScanner.nextInt(); //MS
		while (menuSelection != 4){ //MS until user selects Exit Program, enter switch control
			switch (menuSelection){ //MS
			case 1: System.out.println("\nContact List > Add New Contact\n");//MS
					c1.addNewContact();
					break;
			case 2: System.out.println("\nContact List > Print List\n");//MS
					System.out.print(c1.printContacts());//MS
					break;
			case 3: System.out.println("\nContact List > Search by Last Name\n");//MS
					System.out.print("Enter Last Name to Search: ");//MS
					String searchName = new String();//MS
					searchName=myScanner.next();//MS
					System.out.print(c1.retrieve(searchName));//MS
					break;
			default: System.out.print("\nContact List Menu\n"+//MS 
					"1 - Add New Contact \n" +
					"2 - Print Contact List \n" +
					"3 - Search by Last Name \n" +
					"4 - Exit Program \n"+
					"Enter the number of the menu item you wish to access: ");
					break;
			}
			System.out.print("\nContact List Menu\n"+//MS reprint menu each time after completing switch actions
					"1 - Add New Contact \n" +
					"2 - Print Contact List \n" +
					"3 - Search by Last Name \n" +
					"4 - Exit Program \n"+
					"Enter the number of the menu item you wish to access: ");
		}
*/
	}

}
